<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <my-com data-test="test" title="这里是自定义标题"></my-com>
    <script src="./dialog.js" type="module"></script>

    <!-- 也可以通过下面方式添加事件 -->
    <script>
        let docom = document.querySelector('my-com')
        console.log(docom)
        docom.__proto__['test'] = function(){
            console.log('点击了test')
        }
    </script>

    
  </body>
</html>
